package com.linwen.tips.tools;

import com.linwen.tips.tools.bean.UserInfoReq;
import com.linwen.tips.tools.util.EmailValidatorUtil;
import org.springframework.stereotype.Component;

@Component
public class RegisterOptimizeServiceImpl {

    public boolean registerUser(UserInfoReq userInfo) {
        if (!EmailValidatorUtil.isValid(userInfo.getEmail())) {
            System.out.println("Invalid email address.");
            return false;
        }

        // 进行其他用户注册逻辑，比如保存用户信息到数据库等
        // 返回注册结果
        return true;
    }
}
